//
//  JYJMusicPlayerTools.h
//  HappyListen
//
//  Created by 冀永金 on 16/9/6.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
@class JYJProgramModel,JYJMusicsContentModel;
@protocol JYJMusicPlayerToolsDelegate <NSObject>
// 通过代理返回当前歌曲播放的进度
- (void)getCurTime:(NSString *)curTime totle:(NSString *)totle progress:(CGFloat)progress;
//  播放结束后，如何操作由外部决定
- (void)endPlayAction;
//播放失败后
- (void)playFail;
@end
@interface JYJMusicPlayerTools : NSObject
@property (nonatomic, strong) AVPlayer *player;
@property (nonatomic, strong) AVPlayerItem *playerItem;
@property (nonatomic, strong) JYJProgramModel *programModel;
@property (nonatomic, strong) JYJMusicsContentModel *musicContentModel;
@property (nonatomic, weak) id<JYJMusicPlayerToolsDelegate>delegate;
//单例方法
+ (instancetype)shareMusicPlayerTools;
// 播放音乐
- (void)playMusic;
//暂停音乐
- (void)pauseMusic;
// 准备播放
- (void)preparePlayMusic;

// 跳转
- (void)seekToTimeWithValue:(CGFloat)value;



@end
